/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multiface.valentinorusso.jpa;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Diego64
 */
@Entity
@Table(name = "log")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Log.findAll", query = "SELECT l FROM Log l"),
    @NamedQuery(name = "Log.findByIdlog", query = "SELECT l FROM Log l WHERE l.idlog = :idlog"),
    @NamedQuery(name = "Log.findByNominativo", query = "SELECT l FROM Log l WHERE l.nominativo = :nominativo"),
    @NamedQuery(name = "Log.findByDataora", query = "SELECT l FROM Log l WHERE l.dataora = :dataora"),
    @NamedQuery(name = "Log.findByAction", query = "SELECT l FROM Log l WHERE l.action = :action")})
public class Log implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idlog")
    private Integer idlog;
    @Basic(optional = false)
    @Column(name = "nominativo")
    private String nominativo;
    @Basic(optional = false)
    @Column(name = "dataora")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataora;
    @Basic(optional = false)
    @Lob
    @Column(name = "log")
    private String log;
    @Column(name = "action")
    private String action;

    public Log() {
    }

    public Log(Integer idlog) {
        this.idlog = idlog;
    }

    public Log(Integer idlog, String nominativo, Date dataora, String log) {
        this.idlog = idlog;
        this.nominativo = nominativo;
        this.dataora = dataora;
        this.log = log;
    }

    public Integer getIdlog() {
        return idlog;
    }

    public void setIdlog(Integer idlog) {
        this.idlog = idlog;
    }

    public String getNominativo() {
        return nominativo;
    }

    public void setNominativo(String nominativo) {
        this.nominativo = nominativo;
    }

    public Date getDataora() {
        return dataora;
    }

    public void setDataora(Date dataora) {
        this.dataora = dataora;
    }

    public String getLog() {
        return log;
    }

    public void setLog(String log) {
        this.log = log;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idlog != null ? idlog.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Log)) {
            return false;
        }
        Log other = (Log) object;
        if ((this.idlog == null && other.idlog != null) || (this.idlog != null && !this.idlog.equals(other.idlog))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "multiface.valentinorusso.jpa.Log[ idlog=" + idlog + " ]";
    }
    
}
